//
//  DataManager.h
//  eGiftr
//
//  Created by Phien Tram on 9/3/13.
//  Copyright (c) 2013 eGiftr. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WebServiceManager.h"

@protocol DataManagerDelegate;

@interface DataManager : NSObject <WebServiceManagerDelegate>

@property (nonatomic, weak) id<DataManagerDelegate> delegate;
@property (nonatomic, retain) WebServiceManager *serviceManager;
@property (nonatomic, strong, readonly) NSString *serviceName;

//user service
+ (id)userRegister:(id)delegate userName:(NSString *)userName email:(NSString *)email password:(NSString *)password city:(NSString *)city fbId:(NSString *)fbId fbToken:(NSString *)fbToken isFbUser:(BOOL)isFbUser;
+ (id)login:(id)delegate isFbUser:(NSNumber *)isFbUser login:(NSString *)username password:(NSString *)password;
+ (id)logout:(id)delegate userId:(NSString *)userId;
+ (id)updateFbFriend:(id)delegate fbId:(NSString *)fbId fbToken:(NSString *)fbToken userId:(NSString *)userId appToken:(NSString *)appToken;

//wish service
+ (id)findKeywords:(id)delegate query:(NSString *)query cate:(NSString *)cate appToken:(NSString *)appToken;
+ (id)getRecommendedKeywords:(id)delegate appToken:(NSString *)appToken;
+ (id)getWish:(id)delegate wishId:(NSString *)wishId appToken:(NSString *)appToken;
+ (id)getWishListByUserId:(id)delegate userId:(NSString *)userId appToken:(NSString *)appToken page:(NSNumber *)page;
+ (id)saveWishesByUserId:(id)delegate userId:(NSString *)userId keywords:(NSArray *)keywords appToken:(NSString *)appToken;

//friends service
+ (id)getFriendsByUserId:(id)delegate userId:(NSString *)userId appToken:(NSString *)appToken page:(NSNumber *)page;

@end


@protocol DataManagerDelegate <NSObject>

- (void)dataManagerFinishGetData:(DataManager *)dataManager response:(id)response error:(NSError *)error;
@end